home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: netnews.upenn.edu!dsinc!scala!news
- From: dave.haynie@scala.com (Dave Haynie)
- Subject: Re: 680X0 -> PPC translator?
- Sender: news@scala.scala.com (Usenet administrator)
- Message-ID: <1996Apr2.230841.8275@scala.scala.com>
- Date: Tue, 2 Apr 1996 23:08:41 GMT
- Reply-To: dave.haynie@scala.com (Dave Haynie)
- References: <31499F8E.26A9@netvision.net.il> <volker.0fw1@vb.franken.de> <315800D7.1854@sapiens.com> <volker.0g32@vb.franken.de> <315C198B.49C2@netvision.net.il> <volker.0g5w@vb.franken.de>
- Nntp-Posting-Host: gator
- Organization: Scala Computer Television, US Research Center
-
- In <volker.0g5w@vb.franken.de>, volker@vb.franken.de (Volker Barthelmann) writes:
- >Jack (avilev@netvision.net.il) wrote:
-
- >: know. you might actually be convinced that 680x0 -> PPC is possible. ;-)
-
- >I doubt that. :-)
-
- >: i don't seem to care about that, get it through your head, i'm NOT
- >: going to intervene with what the program does with any memory area,
- >: just as long as this memory area is not later being used for code
-
- >Unfortunately You have to know about all other memory areas as well,
- >because otherwise You cannot determine what is code and what is data.
-
- Sure you can. The practical binary translators that exist today (and
- there are some, which work very well) do this very simply. They work
- in conjunction with an emulator, and the emulator keeps track of what
- runs and what doesn't. Anything that's executed is code, and such a
- chunk can itself be translated based on static analysis. Anything that
- doesn't run might not be code. So you don't translate it; if it's
- data, you're safe. If it's code, and it never runs, there's no point
- in translating it. If it does run later, you translate it later.
-
- >Think about: The program writes a value somwhere. Then copies it around,
- >shifts it, moves it again etc. and than sometimes it reads it from where
- >it is now, loads it in a0 and does a jmp (a0) or so.
-
- The AmigaOS and the 680x0 don't support self-modifying code. So you
- can't really do any data to instruction transforms, except in very
- controlled situations (LoadSeg(), for instance), and expect it to work
- on anything much beyond a vanilla 68000.
-
- >Still I claim You can't even reliably decide what is code and what is data.
- >Even if self-modifying code is forbidden.
-
- You can, using dynamic flow analysis. DEC does this, quite
- successfully, under Windows NT for the Alpha. They get about 70% of
- native performance out of 80x86 binaries, once the translation is done
- for the active parts of a program. You can never get 100%, since the
- translated code will still have to mimic what the foreign code does,
- which is unlikely to be optimal for anything but that foreign
- processor. But it's still a long ways from the 1/10th or so
- performance you're likely to get with pure emulation.
-
- So basically, stop the arguments, I'm offering an existance proof. It
- exists, it works very well, and it could for 680x0 to PowerPC
- binaries, given enough work.
-
- Dave Haynie | ex-Commodore Engineering | for DiskSalv 3 &
- Sr. Systems Engineer | Hardwired Media Company | "The Deathbed Vigil"
- Scala Inc., US R&D | Ki No Kawa Aikido | info@iam.com
-
- "Feeling ... Pretty ... Psyched" -R.E.M.
-
-